<!--
 * @Author: Cui Ruichen
 * @Date: 2023-03-23 16:00:46
 * @LastEditors: Cui Ruichen
 * @LastEditTime: 2023-03-23 16:00:46
 * @Description: 头部布局样式
-->
<template>
  <div class="po-header flex-r">
    <div></div>
    <div class="user-info">
      <el-button type="primary" @click="loginOut">退出登录</el-button>
    </div>
  </div>
</template>

<script setup lang="ts">
// import { getUserInfo } from '@/api/user'
import { useRouter } from 'vue-router'

const router = useRouter()

/**
 * @description:
 * @author Cui Ruichen
 * @date 2023-03-25 10:22:30
 */
const loginOut = async () => {
  router.replace({
    path: '/login',
  })
  localStorage.removeItem('token')
}
</script>

<style scoped lang="scss">
.po-header {
  height: 100%;
  justify-content: space-between;
  align-items: center;
  .user-info {
  }
}
</style>
